<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="<%=basePath%>">
<title>job detail</title>
<link href="daoepingcss/job.css" rel="stylesheet" type="text/css" />
<link href="daoepingcss/jobdetail.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/city.js"></script>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="daoepingjs/script_common.js" type="text/javascript"></script>
<script src="js/Calendar.js"></script>

</head>
<script type="text/javascript">

$(document).ready(function() {

 	$("#SkillAdd").click(function(){
 		$("#PersonalSkillTb").append($("#PersonalSkill").clone());
 	});
 	
	$("#cancel").click(function(e){
	   $( e.target ).closest("tr").toggleClass("hilight");
	});
	
	
//	alert($("#UserSkillDetailList_id").val());
//	var myobj = new ArrayList();
//	var size = $("#UserSkillDetailList").size();
//	alert("-----------"+size);
	var kk = $("#autoSkillList").val();
	alert("***************autoSkillList="+kk);
//	alert("***************"+$("#rr2").size());
//	alert("***************"+$("#rr3").size());
//	alert("***************"+$("#ww").size());
	
	var myobj = $("#ww").val();
	alert("*************myobj="+myobj);
	//alert("*************myobj.bsc_workyear.id="+myobj.bsc_workyear.id);
	alert("qq="+$("#qq").val());
	
//	$.each( { name: "John", lang: "JS" }, function(i, n){
//	  alert( "Name: " + i + ", Value: " + n );
//	}); 

	
//	$.each(myobj, function(i, item){
	//	alert("myobj.item[0]="+item);
//	});

	var arr1 = [[1, 4, 3], [4, 6, 6], [7, 20, 9]]
	$.each(arr1, function(i, item){
	alert(item[0]);
	}); 
	
});



</script>
<body class="bg-eee" >

	<form action="EditUserProduction" method="post" id="editUserProduction" >
		<div id="header">
			<div id="datetime"></div>

		</div>


		<div class="detail_ad" id="jobinfot-1"></div>
		<div id="conDetail">
			<s:set value="#request.myUsr_userProduction" id="usr_userProduction" />
		
			<h2>
				User name: <s:property value="#usr_userProduction.usr_user.username"/>&nbsp;	
				<s:hidden name="usr_userProduction.usr_user.id" value="%{#usr_userProduction.usr_user.id}"></s:hidden>
				<s:hidden name="usr_userProduction.id" value="%{#usr_userProduction.id}"></s:hidden>
			</h2>
			<div class="lnDet"></div>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbPosi">

				<tr>
					<td class="wTit">Work Year</td>
					<td class="wCon">
				   		<s:bean name="workYearAction" id="workYearList"/>
						<s:select name="usr_userProduction.bsc_workyear.id" list="#workYearList.findAllWorkYearList()" listKey="id" listValue="workyear" 
						theme="simple" value="%{#usr_userProduction.bsc_workyear.id}"> </s:select>年
					</td>	
	

				</tr>		
	
				<tr>
					<td class="wTit">JobType</td>
					<td class="wCon">
						<s:bean name="jobTypeAction" id="jobTypeList"/>
						<s:select id="mySS" name="usr_userProduction.bsc_jobtype.id" list="#jobTypeList.findAllJobTypeList()" listKey="id" listValue="name" 
						theme="simple" value="%{#usr_userProduction.bsc_jobtype.id}"> </s:select>
					</td>	
				</tr>
				
				<tr>
					<td class="wTit">Educational</td>				
					<td class="wCon">
						<s:bean name="educationalAction" id="educationalList"/>
						<s:select name="usr_userProduction.bsc_educational.id" list="#educationalList.findAllEducationalList()" listKey="id" listValue="educationalLevel" 
						theme="simple" value="%{#usr_userProduction.bsc_educational.id}"> </s:select>
					
					</td>	
					<td></td>				
				</tr>
				<tr>
				<td  class="wCon">
					<s:textarea  cols="160" rows="10" name="usr_userProduction.description" key="Description" value="%{#usr_userProduction.description}"/>							
				</td>
				</tr>				

			</table>
			<p>&nbsp;</p>
			<div class="titDetCon">Personal Skill Information</div>
						
		 	<div id="usr_skill_detail">
			<table id="PersonalSkillTb" width="100%" border="0" cellspacing="0" cellpadding="0" class="tbPosi">

			<s:hidden  value="#request.myUserSkillDetailList" id="rr"></s:hidden>
			
			
			<s:iterator value="#request.myUserSkillDetailList" id="UserSkillDetailList" >
			
			
			<s:hidden  value="%{#request.myUserSkillDetailList}" id="rr2"></s:hidden>
			<s:hidden  value="%{#rr2.description}" id="rr3"></s:hidden>
			
			
			
				<tr id="PersonalSkill">	
					<s:hidden name="UserSkillDetailList.id" value="%{#UserSkillDetailList.id}"></s:hidden>				
					<td class="wTit">Skill</td>
					<td class="wCon">
						<s:bean name="skillAction" id="skillList"/>
						<s:select name="skillid" list="#skillList.findAllSkillList()" listKey="id" listValue="name" 
						theme="simple" value="%{#UserSkillDetailList.bsc_skill.id}"> </s:select>		
						
						<s:hidden value="%{#skillList.findAllSkillAutoComplete()}" id="autoSkillList"></s:hidden>
						
						
									
					</td>
					<td class="wTit">Grade</td>				
					<td class="wCon">
						<s:bean name="gradeAction" id="gradeList"/>
						<s:select name="gradeid" list="#gradeList.findAllGradeList()" listKey="id" listValue="name" 
						theme="simple" value="%{#UserSkillDetailList.bsc_grade.id}"> </s:select>
					</td>
					<td class="wTit">UseYear</td>
					<td class="wCon">
						<s:bean name="workYearAction" id="skillWorkYearList"/>
						<s:hidden  value="%{#skillWorkYearList.findAllWorkYearList()}" id="ww"></s:hidden>
						<s:hidden  value="%{#qq.bsc_workyear.id}" id="qq"></s:hidden>
						<s:select name="workyearid" list="#skillWorkYearList.findAllWorkYearList()" listKey="id" listValue="workyear" 
						theme="simple" value="%{#UserSkillDetailList.bsc_workyear.id}"> </s:select>					
					</td>				
					<td>
						<s:textfield key="Comment" name="skilldescription" value="%{#UserSkillDetailList.description}"/>				
					</td>
					<td id="cancel"><img src="images/cancel.png" ></td>						
				</tr>
			</s:iterator>
				
			</table>
				

			</div>
			<div class="advline mb-10" id="middle1">
				<p><a class="buttton" id="SkillAdd" style="cursor: hand" >Add</a></p>
			
				<input type="submit" value="submit"/>
			</div>

		</div>
	</form>
</body>


</html>
